package me.zhengjie.modules.logs.service.impl;

import lombok.extern.slf4j.Slf4j;
import me.zhengjie.modules.logs.domain.BusinessLog;
import me.zhengjie.modules.logs.mapper.BusinessLogMapper;
import me.zhengjie.modules.logs.service.BusinessLogService;
import me.zhengjie.tool.NPETool;
import me.zhengjie.utils.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Slf4j
@Transactional
public class BusinessLogServiceImpl implements BusinessLogService {

    @Resource
    private BusinessLogMapper businessLogMapper;

    @Override
    public void deleteFile(String id) {
    }

    @Override
    public void save(BusinessLog businessLog) {
        NPETool.isEmptyThrowException(businessLog.getAaz002(),"日志编号不能为空");
        NPETool.isEmptyThrowException(businessLog.getAaa121(),"业务类型不能为空");

        businessLogMapper.insert(businessLog);
    }
}
